package com.zp.common.base.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zp.common.base.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserRepository extends BaseMapper<User> {

    @Select("select * from t_user where username=#{username} and status=#{status}")
    User findByUsernameAndStatus(@Param("username") String username, @Param("status")Integer status);

    @Select("select * from t_user where email=#{email} and status=#{status}")
    User findByEmailandStatus(@Param("email") String email, @Param("status") Integer constantOne);
}
